package com.futvan.z.framework.core;

import com.futvan.z.framework.common.bean.Result;
import com.futvan.z.framework.util.DateUtil;
import com.futvan.z.framework.util.SystemUtil;
import com.futvan.z.framework.util.WarningUtil;
import com.futvan.z.system.zwarning.z_warning;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;

/**
 * 预警监控任务
 */
public class WarningJob implements StatefulJob{

	public void execute(JobExecutionContext context) throws JobExecutionException {
		String zid =  context.getJobDetail().getJobDataMap().getString("zid");
		Result result = null;
        try {
			//执行预警监控
            result = WarningUtil.SendWarningMsg(zid);
        } catch (Exception e) {
            result.setError(e.getMessage());
        }
		z.Log("预警监控任务："+result.getMsg());
	}
}
